#include "cJSON.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc,char *argv[])
{
	int ret = 0;
	const char * cont = "{\"code\":0,\"msg_id\":24,\"d\":\"20191121\",\"data\":{\"bucket\":\"aias-v-1255521909\",\"dir\":\"media/2019-11-21/MZV208276H6LWXAF/\",\"expired_time\":\"2019-11-21 11:03:47\",\"region\":\"ap-beijing\",\"tmp_secret_id\":\"AKIDRJN2jHnH02vHu0OQ85ae5mrg5m6MryehsJtPcj0JwOcUaWPTMd8WIJHckHODjixO\",\"tmp_secret_key\":\"DA/pKFd+3cdOVLBU/FV7UJRMxyuJPGlzr+1wXM86bo4=\",\"token\":\"tkHoVWnSvuGrJ8VdKJOtcnp50CycvJDmb00f77d42b3c3022a6266a83f66ab917z7HeFG5y0UCNqMYj-YLpOkWNkT-LurpmwQZUDmEaz__vXFytrxc9OV8n6Vg2f0VJ8Ekjo8YoQr8iywRhAQUBAsRVadV__AGHjFGKMrnXYV6VGwN0XlGft_y_1E9mt3KkEmsVkY8FIBI4Zn34eU9sR9My5Oixzkj42Z409kgCiJjE3wAf5jupqalIdNHfSsVXXFvHRW_VR0d5I388cTJq54M6Propwn0z_18BHytOfRPDr73IX1zMdIFBAxqs-ngkeTfcYwR2EoaWQjX79jqc0Kkz9AM7Yh-roLrnKqfpGc3h_3IyiweFt0lYZeM2bIrw2_nlNwna6wVqPUHEFSw52SoYWNKG0_N_stainz-3awxk-DziVDLLwavoc96OrWK_NUOtu4wZ6eQuzQ_wG8xFR-Xj4flnIdKhUV-mJXfshslXVRbt1e6cX8d3yzFjhEuNOt6hYs6fxoLc4IHmx6FkRGBNusfPj2LWzBfAgdG5snc\"}}\"}\"}";

	cJSON *proot = cJSON_Parse(cont);
	cJSON *pdata = cJSON_GetObjectItem(proot,"data");
	cJSON *pitem = cJSON_GetObjectItem(pdata,"bucket");
	printf("item = %p,type = %d\n",pitem,pitem->type);
	printf("value = %s\n",pitem->valuestring);
	cJSON_Delete(proot);
	return ret;
}
